# -*- encoding: utf-8 -*-
'''
@File    :   2.py
@Time    :   2022/11/09 23:11:20
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib

'''
2 写一个程序,从input.txt中读取之前输入的数据,存入列表中，再加上行号打印显示；格式如下
#第一行： xxxx
#第二行： xxxx
'''

if __name__ == "__main__":
    with open(r"homework3\input.txt", "r") as f:
        list1 = []

        for line in f.readlines():
            line = line.strip()
            list1.append(line)
        for i in range(1, len(list1)+1):
            print("第%s行" % (i), list1[i-1])
